package cn.metafoo.common.enums;

import cn.metafoo.common.core.IntArrayValuable;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;

/**
 * 通用 开关 枚举
 * @author fatto
 */

@Getter
@AllArgsConstructor
public enum NormalStatusEnum implements IntArrayValuable {
    /**
     * 开启
     */
    ENABLE(0, "开启"),
    /*
     * 关闭
     */
    DISABLE(1, "关闭");

    public static final int[] ARRAYS = Arrays.stream(values()).mapToInt(NormalStatusEnum::getStatus).toArray();
    /**
     * 状态值
     */
    private final Integer status;
    /**
     * 状态名
     */
    private final String name;

    @Override
    public int[] array() {
        return ARRAYS;
    }

}
